#ifndef CCLOUD_H_
#define CCLOUD_H_
#include "CBase.h"
#include <vector>
#include "CShape.h"
using std::vector;

class CPlayer;
class CRainDrop;
struct Animation;
enum CloudStates { IDLE, EAT, BOLT };

class CCloud : public CBase
{
private:
public:
	CShape				 m_Quad;
	vector<Animation*>	 m_vAnimations;
	CPlayer				*m_pPlayer;
	vector<CRainDrop>	 m_vRainDrops;
	float				 m_fHeightFromPlayer;
	float				 m_fEmitRate, m_fEmitTimer;
	float				 m_fRadius;
	unsigned int		 m_unCurrState;


	CCloud();
	~CCloud();

	void Update(float fElapsed);
	void Render();
	bool CheckCollision(CBase *pBase);
	void StartRain();
	void CreateRainDrop(Vec3 &DownVec);
};

struct Texture;

class CRainDrop : public CBase
{
private:
public:

	static Texture *s_pTexture;
	static CShape s_QUAD;

	float	m_fLifeSpan;
	float	m_fAge;

	CRainDrop();

	void Update(float fElapsed);
	void Render();
	bool CheckCollision(CBase *pBase);
};

#endif